The present subject matter relates to an efficient technique for computing standard deviation (sigma) and variance for a variable, such as a variable parameter measured as part of a closed-loop control operation or a test procedure, and to circuitry and/or programs and processors for implementing that technique.
There are many applications today that involve monitoring of a physical process and computing useful statistical information based on sample data obtained from the process monitoring. In a manufacturing process, this may entail sampling a process variable or a performance variable of the manufactured process, for example as each unit produced passes through a particular phase of the production process. In an electrical or mechanical device, this may entail sampling a detectable parameter during device operation, for example as part of a test run immediately following manufacture or during a later re-test. In a disk drive, for example, the drive processor may detect and process a temperature value or a xe2x80x9cseek timexe2x80x9d required to find an addressed location on the disk. In a tape drive example, the drive processor may monitor a position error signal (PES), the Tracking Servo Error, the Tape Speed Error, under run margin, under run time or ramp distances.
Running control functions often simply determine the difference between a current value of such a measurement and a target or threshold value and adjust the process in question based on the result of that determination. However, there are many testing and manufacturing control techniques that require more complex statistical information.
In many modern processes and devices, it is necessary to control a manufacturing process or other operational process based on a measure of performance over some period of time. For this purpose, the circuitry or processor must process some number of samples and compute a useful measure of performance from the sample population. A large number of such applications call for statistical calculation of sigma ("sgr"), which is the standard deviation; and other processes utilize the variance, which corresponds to "sgr"2. Other performance measures are calculated from "sgr" or "sgr"2, such as the capability analysis index (Cpk) of a process, which shows whether process data points are within specified limits. The process capability index, Cpk, is a standard measure of process capability over an extended period of time for a process exhibiting statistical control. Cpk is considered to be a reliable indicator of process performance, taking into account process variation and deviation from nominal. A xe2x80x9cdesign of experimentxe2x80x9d (DOE) process changes a process variable, and the "sgr", the "sgr"2, or some related performance measure is calculated during a subsequent process run to determine the process performance.
For example, U.S. Pat. No. 5,956,251 to Atkinson et al. discloses methods for meeting end item/assembly tolerance criteria for large flexible parts, which includes calculation of values of Cpk based on the standard deviation ("sgr") of the sample population. U.S. Pat. No. 6,269,326 to Lejeune teaches processing the population of samples for each of a plurality of tests run at different measurement dates, to compute an average or mean of the measurements and a standard deviation of the measurements (sigma) for each test date. Then, for each set of samples and for each test date, the methodology computes a criterion of appreciation (CP), defined as the ratio between a difference of limits and the standard deviation.
In current processing and control techniques, the calculation of "sgr" or "sgr"2 requires considerable time to accumulate sample data and excessive data storage for the samples, until the "sgr" or "sgr"2 value(s) can be calculated using an entire sample data population. Even after collecting the entire population, the individual processing of each sample as part of the computation takes considerable time and processor power. More specifically, calculation of "sgr" or "sgr"2, requires accumulating the entire xe2x80x9cpopulationxe2x80x9d or sample set and then calculating the mean (sum divided by n, the number of samples). The mean is subtracted from each individual sample data point, and each result is squared. The variance ("sgr"2) equals the sum of these squares divided by nxe2x88x921; and of course, the standard deviation ("sgr") equals the square root of the variance.
For an n-sample size, the collection of data can consume a sizable memory and the processing thereof requires considerable time after the data acquisition is completed. As a result, real-time computation of the "sgr" or "sgr"2 value or of any of the performance measures that may be derived therefrom is not practical.
Hence, a need exists for a particularly efficient technique for computing standard the deviation (sigma) and/or the variance of a variable in real time, for example, for use in a process controller or in a performance measurement application. A related need exists for a processing circuit and/or a programmed general purpose processor for implementing the efficient technique for computing these statistical measures of the variable.
The inventive concepts meet the above noted needs in the art as they relate to techniques and devices for efficiently calculating standard deviation or variance or the like, for a measured process variable or parameter. For example, the concepts alleviate the need to store all samples in the test population until the end of the test run, substantially reducing the memory requirements. The concepts also provide a simpler calculation at the end of the test run, reducing the processing power and time required. These improvements make it possible to implement the calculation of standard deviation or variance for a measured variable or the like as an imbedded function of a processor or other circuit within a manufactured electromechanical device, such as a tape drive or disk drive.
Hence, one aspect relates to a device for computing a statistical value related to a measured process parameter during ongoing operation of the process. A sampling circuit, responsive to a signal representing the measured process parameter, provides a predetermined number of samples of the measured process parameter in sequence, during operation of the process. The device includes means for generating a representation of the variance of the measured process parameter and/or the standard deviation of the measured process parameter in real-time. The device does not store all of the samples of the measured process parameter until completion of the sampling. In a preferred embodiment, the means generates the representation based on summation of the predetermined number of the samples of the measured process parameter and summation of squares of the predetermined number of the samples of the measured process parameter, while actual sample values are effectively discarded.
A method embodiment in accord with this concept generates a statistical measure of performance, such as variance or standard deviation, from a measured process variable during ongoing operation of a process. This method entails measuring the variable to generate a signal and taking a predetermined number (n) of samples from the signal, during the ongoing operation of the process. Concurrent with the sampling, a running sum of the n samples is accumulated, and a running sum of squares of the n samples is accumulated. Accumulation of these two sums does not require storing all n samples until the end of the method. Typically, the individual samples can be discarded. At the end of the sampling, the method involves processing a final value of the sum of the n samples and a final value of the sum of the squares of the n samples, to produce the statistical measure of performance.
An embodiment of an apparatus for implementing this technique includes a sampler responsive to the signal representing the measured process variable, for sampling the signal during ongoing operation of the process to generate a predetermined number (n) of samples. The apparatus includes two computation modules, which may be implemented in circuitry, but preferably are implemented in code or microcode for execution by a programmable digital processor. An interim computation module accumulates the sum of the n samples, and it accumulates a sum of squares of the n samples, during the ongoing operation of the process, without retaining all of the n samples. A one time computation module, coupled to the interim computation module, computes the statistical measure of performance in response to the final sum of the n samples and the final sum of squares of the n samples.
The preferred embodiment of the interim computation module comprises two accumulator loops and a multiplier. A first accumulator loop receives the n samples and accumulates the sum of the n samples during ongoing operation of the process. The multiplier calculates the square of each of the n samples as received from the sampler, and the second accumulator loop accumulates the sum of the squares of the n samples from the multiplier.
The preferred embodiment of the one time computation module comprises means for receiving the sum of the n samples and the sum of squares of the n samples and in response calculating:       σ    2    =            1              n        -        1              ⁢          (                                    ∑                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      x            i            2                          -                              n            ⁢            μ                    2                    )      
where:
"sgr"2 is variance,
xcexc is mean of the n samples of the process variable (sum of sample divided by n); and
x1 is sample for ith sampling interval, in range from 1 to n.
In the preferred embodiment, the one time computation module also outputs the mean (xcexc) and computes the square root of the variance to provide an output of the standard deviation.
A particular advantage of the technique supplemented by the embodiments is that it can be implemented as an embedded function of any manufactured device that contains an appropriate electronic circuit or microprocessor. The manufactured device can include discrete logic circuitry or preferably one or more modules of program code for the processor, to enable the device to automatically calculate the variance and/or the standard deviation and possibly other statistical measures of performance, for example as part of a test run immediately following manufacture or during a later re-test. In a disk drive, for example, the drive processor may detect and process a temperature value or a xe2x80x9cseek timexe2x80x9d required to find an addressed location on the disk. In a tape drive, the drive processor may monitor a position error signal (PES), the Tracking Servo Error, the Tape Speed Error, under run margin, under run time or ramp distances. In each of these examples, after accumulating the sum and the sum of the squares from the desired number of samples, the imbedded circuit or program functions to perform the one-time calculation(s) and output one or more of the statistical measures of performance.
Additional objects, advantages and novel features of the embodiments will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following and the accompanying drawings or may be learned by practice of the invention. The objects and advantages of the inventive concepts may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.